﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

using Finance.Entites;
using Finance.Service.Interfaces;

namespace Finance.Service.Implements
{
    /// <summary>
    /// Store the data with json format in the disk
    /// </summary>
    /// <typeparam name="TEntity">The graph of store object contains in ObserableCollection</typeparam>
    public class MockPayoutClassificationDataStore : JsonDataStore<PayoutClassification>
    {
        private static ObservableCollection<PayoutClassification> _ClassificationCollections = new ObservableCollection<PayoutClassification>();
        public override ObservableCollection<PayoutClassification> Items
        {
            get
            {
                if (base._Items == null || base._Items.Count == 0)
                {
                    _ClassificationCollections.Clear();

                    var classifications = new List<PayoutClassification>()
                    {
                        new PayoutClassification() { Name = "衣裤鞋帽",Group="衣着服装" },
                        new PayoutClassification() { Name = "表带饰品" ,Group="衣着服装"},
                        new PayoutClassification() { Name = "护肤化妆" ,Group="衣着服装"},

                        new PayoutClassification() { Name = "物业管理" ,Group="物业水电"},
                        new PayoutClassification() { Name = "房屋租金" ,Group="物业水电"},
                        new PayoutClassification() { Name = "水电煤气" ,Group="物业水电"},
                        new PayoutClassification() { Name = "维护保养" ,Group="物业水电"},

                        new PayoutClassification() { Name = "公共交通" ,Group="交通行驶"},
                        new PayoutClassification() { Name = "出租野的" ,Group="交通行驶"},
                        new PayoutClassification() { Name = "火车轻轨" ,Group="交通行驶"},
                        new PayoutClassification() { Name = "民航客机" ,Group="交通行驶"},

                        new PayoutClassification() { Name = "家用座机" ,Group="信息通讯"},
                        new PayoutClassification() { Name = "手机通讯" ,Group="信息通讯"},
                        new PayoutClassification() { Name = "宽带上网" ,Group="信息通讯"},
                        new PayoutClassification() { Name = "信件包裹" ,Group="信息通讯"},

                        new PayoutClassification() { Name = "一日三餐" ,Group="日常饮食"},
                        new PayoutClassification() { Name = "烟酒茶水" ,Group="日常饮食"},
                        new PayoutClassification() { Name = "水果零食" ,Group="日常饮食"},
       
                        new PayoutClassification() { Name = "腐败酒会" ,Group="外出娱乐"},
                        new PayoutClassification() { Name = "本地休闲" ,Group="外出娱乐"},
                        new PayoutClassification() { Name = "长途旅游" ,Group="外出娱乐"},
                        new PayoutClassification() { Name = "运动健身" ,Group="外出娱乐"},
                        new PayoutClassification() { Name = "室内颓废" ,Group="外出娱乐"},
                        new PayoutClassification() { Name = "包房唱K" ,Group="外出娱乐"},

                        new PayoutClassification() { Name = "书报期刊" ,Group="学习充电"},
                        new PayoutClassification() { Name = "技能培训",Group="学习充电" },
                        new PayoutClassification() { Name = "培训报名" ,Group="学习充电"},

                        new PayoutClassification() { Name = "人情往来" ,Group="请客送礼"},
                        new PayoutClassification() { Name = "孝敬长辈" ,Group="请客送礼"},
                        new PayoutClassification() { Name = "还钱人情" ,Group="请客送礼"},
                        new PayoutClassification() { Name = "求人办事",Group="请客送礼" },

                        new PayoutClassification() { Name = "医药处方",Group="医疗保健" },
                        new PayoutClassification() { Name = "保健按摩" ,Group="医疗保健"},
                        new PayoutClassification() { Name = "美容美发" ,Group="医疗保健"},
                        new PayoutClassification() { Name = "治疗住院",Group="医疗保健" },

                        new PayoutClassification() { Name = "银行业务" ,Group="金融产品"},
                        new PayoutClassification() { Name = "股票基金" ,Group="金融产品"},
                        new PayoutClassification() { Name = "按揭还贷" ,Group="金融产品"},
                        new PayoutClassification() { Name = "缴税纳税" ,Group="金融产品"},
                        new PayoutClassification() { Name = "债券投资" ,Group="金融产品"},
                        new PayoutClassification() { Name = "其他投资" ,Group="金融产品"},

                        new PayoutClassification() { Name = "其他业务" ,Group="其他类型"},
   
                    };

                    foreach (var classification in classifications)
                    {
                        _ClassificationCollections.Add(classification);
                    }
                    base._Items = _ClassificationCollections;
                    base.Commit();
                }

                return base._Items;
            }
        }
    }
}
